package com.example.mapper.appointment;


import cn.hutool.core.date.DateTime;
import com.example.model.entity.appointment.Reservation;
import com.example.model.vo.ReservationVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 操作reservation相关数据接口
*/
public interface ReservationMapper {

    /**
      * 新增
    */
    int insert(Reservation reservation);

    /**
      * 删除
    */
    int deleteById(Integer id);

    /**
      * 修改
    */
    int updateById(Reservation reservation);

    /**
      * 根据ID查询
    */
    Reservation selectById(Integer id);

    /**
      * 查询所有
    */
    List<ReservationVO> selectAll(Reservation reservation);

    List<Reservation> selectByDoctorAndDateRange(@Param("doctorId") int doctorId,
                                                 @Param("startDate") DateTime startDate,
                                                 @Param("endDate") DateTime endDate);
}
